﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data.OleDb;

namespace DAO
{
    public class DataProvider
    {
        /// <summary>
        /// Tạo kết nối đến CSDL QuanLyKhachHang.mdb (thư mục GUI\bin\Debug)
        /// </summary>
        /// <returns></returns>
        public static OleDbConnection ConnectDB()
        {
            string connectionString = "Provider = Microsoft.Jet.OLEDB.4.0; Data Source = QuanLyKhachHang.mdb";
            OleDbConnection conn;
            conn = new OleDbConnection(connectionString);
            conn.Open();
            return conn;
        }
    }
}
